package com.ruoyi.project.mydy.cinemaplan.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mydy.cinemaplan.mapper.DlCinemaPlanMapper;
import com.ruoyi.project.mydy.cinemaplan.domain.DlCinemaPlan;
import com.ruoyi.project.mydy.cinemaplan.service.IDlCinemaPlanService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 影院排片Service业务层处理
 * 
 * @author mhg
 * @date 2021-10-07
 */
@Service
public class DlCinemaPlanServiceImpl implements IDlCinemaPlanService 
{
    @Autowired
    private DlCinemaPlanMapper dlCinemaPlanMapper;

    /**
     * 查询影院排片
     * 
     * @param id 影院排片主键
     * @return 影院排片
     */
    @Override
    public DlCinemaPlan selectDlCinemaPlanById(Long id)
    {
        return dlCinemaPlanMapper.selectDlCinemaPlanById(id);
    }

    /**
     * 查询影院排片列表
     * 
     * @param dlCinemaPlan 影院排片
     * @return 影院排片
     */
    @Override
    public List<DlCinemaPlan> selectDlCinemaPlanList(DlCinemaPlan dlCinemaPlan)
    {
        return dlCinemaPlanMapper.selectDlCinemaPlanList(dlCinemaPlan);
    }

    /**
     * 新增影院排片
     * 
     * @param dlCinemaPlan 影院排片
     * @return 结果
     */
    @Override
    public int insertDlCinemaPlan(DlCinemaPlan dlCinemaPlan)
    {
        dlCinemaPlan.setCreateTime(DateUtils.getNowDate());
        return dlCinemaPlanMapper.insertDlCinemaPlan(dlCinemaPlan);
    }

    /**
     * 修改影院排片
     * 
     * @param dlCinemaPlan 影院排片
     * @return 结果
     */
    @Override
    public int updateDlCinemaPlan(DlCinemaPlan dlCinemaPlan)
    {
        return dlCinemaPlanMapper.updateDlCinemaPlan(dlCinemaPlan);
    }

    /**
     * 批量删除影院排片
     * 
     * @param ids 需要删除的影院排片主键
     * @return 结果
     */
    @Override
    public int deleteDlCinemaPlanByIds(String ids)
    {
        return dlCinemaPlanMapper.deleteDlCinemaPlanByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除影院排片信息
     * 
     * @param id 影院排片主键
     * @return 结果
     */
    @Override
    public int deleteDlCinemaPlanById(Long id)
    {
        return dlCinemaPlanMapper.deleteDlCinemaPlanById(id);
    }
}
